<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qclprogram.cpp -->
  <title>QCLProgram Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <script src="./scripts/superfish.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />  <script src="./scripts/narrow.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->
</head>
<body class="" onload="CheckEmptyAndLoadList();">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="150"><img src="images/qt-logo.png" align="left" border="0" />&nbsp;&nbsp;<img src="images/qtopencl-logo.png" border="0" /></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"> <a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="qtopencl-all-classes.html"><font color="#004faf">All Classes</font></a></td>
</table>              <li><a href="modules.html">Modules</a></li>              <li>QtCL</li>
              <li>QCLProgram</li>
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QCLProgram Class Reference</h1>
<!-- $$$QCLProgram-brief -->
<p>The QCLProgram class represents an OpenCL program object. <a href="#details">More...</a></p>
<!-- @@@QCLProgram -->
<pre class="highlightedCode brush: cpp">    #include &lt;QCLProgram&gt;</pre><p>This class was introduced in QtOpenCL 4.7.</p>
<ul>
<li><a href="qclprogram-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#QCLProgram">QCLProgram</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#QCLProgram-2">QCLProgram</a></b> ( QCLContext * <i>context</i>, cl_program <i>id</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#QCLProgram-3">QCLProgram</a></b> ( const QCLProgram &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#dtor.QCLProgram">~QCLProgram</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QByteArray&gt; </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#binaries">binaries</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#build">build</a></b> ( const QString &amp; <i>options</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#build-2">build</a></b> ( const QList&lt;QCLDevice&gt; &amp; <i>devices</i>, const QString &amp; <i>options</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLContext * </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#context">context</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLKernel </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#createKernel">createKernel</a></b> ( const char * <i>name</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLKernel </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#createKernel-2">createKernel</a></b> ( const QByteArray &amp; <i>name</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLKernel </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#createKernel-3">createKernel</a></b> ( const QString &amp; <i>name</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QCLKernel&gt; </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#createKernels">createKernels</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QCLDevice&gt; </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#devices">devices</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#isNull">isNull</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#log">log</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> cl_program </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#programId">programId</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#sourceCode">sourceCode</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#operator-not-eq">operator!=</a></b> ( const QCLProgram &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLProgram &amp; </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#operator-eq">operator=</a></b> ( const QCLProgram &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#operator-eq-eq">operator==</a></b> ( const QCLProgram &amp; <i>other</i> ) const</td></tr>
</table>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qclprogram.html#unloadCompiler">unloadCompiler</a></b> ()</td></tr>
</table>
<a name="details"></a>
<!-- $$$QCLProgram-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QCLProgram class represents an OpenCL program object.</p>
</div>
<!-- @@@QCLProgram -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCLProgram[overload1]$$$QCLProgram -->
<h3 class="fn"><a name="QCLProgram"></a>QCLProgram::QCLProgram ()</h3>
<p>Constructs a null OpenCL program object.</p>
<!-- @@@QCLProgram -->
<!-- $$$QCLProgram$$$QCLProgramQCLContext*cl_program -->
<h3 class="fn"><a name="QCLProgram-2"></a>QCLProgram::QCLProgram ( <a href="qclcontext.html">QCLContext</a> * <i>context</i>, cl_program <i>id</i> )</h3>
<p>Constructs an OpenCL program object from the native identifier <i>id</i>, and associates it with <i>context</i>. This class will take over ownership of <i>id</i> and will release it in the destructor.</p>
<!-- @@@QCLProgram -->
<!-- $$$QCLProgram$$$QCLProgramconstQCLProgram& -->
<h3 class="fn"><a name="QCLProgram-3"></a>QCLProgram::QCLProgram ( const QCLProgram &amp; <i>other</i> )</h3>
<p>Constructs a copy of <i>other</i>.</p>
<!-- @@@QCLProgram -->
<!-- $$$~QCLProgram[overload1]$$$~QCLProgram -->
<h3 class="fn"><a name="dtor.QCLProgram"></a>QCLProgram::~QCLProgram ()</h3>
<p>Releases this OpenCL program object. If this is the last reference to the program, it will be destroyed.</p>
<!-- @@@~QCLProgram -->
<!-- $$$binaries[overload1]$$$binaries -->
<h3 class="fn"><a name="binaries"></a>QList&lt;QByteArray&gt; QCLProgram::binaries () const</h3>
<p>Returns a list of binaries for this program for each of the <a href="qclprogram.html#devices">devices</a>().</p>
<p>See also <a href="qclprogram.html#devices">devices</a>() and <a href="qclprogram.html#sourceCode">sourceCode</a>().</p>
<!-- @@@binaries -->
<!-- $$$build[overload1]$$$buildconstQString& -->
<h3 class="fn"><a name="build"></a>bool QCLProgram::build ( const QString &amp; <i>options</i> = QString() )</h3>
<p>Builds this program from the sources and binaries that were supplied, with the specified compiler <i>options</i>.</p>
<p>Returns true if the program was built; false otherwise.</p>
<p>See also <a href="qclprogram.html#log">log</a>() and <a href="qclprogram.html#createKernel">createKernel</a>().</p>
<!-- @@@build -->
<!-- $$$build$$$buildconstQList<QCLDevice>&constQString& -->
<h3 class="fn"><a name="build-2"></a>bool QCLProgram::build ( const QList&lt;<a href="qcldevice.html">QCLDevice</a>&gt; &amp; <i>devices</i>, const QString &amp; <i>options</i> = QString() )</h3>
<p>This is an overloaded function.</p>
<p>Builds this program from the sources and binaries that were supplied, with the specified compiler <i>options</i>.</p>
<p>If <i>devices</i> is not empty, the program will only be built for devices in the specified list. Otherwise the program will be built for all devices on the program's context.</p>
<p>Returns true if the program was built; false otherwise.</p>
<p>See also <a href="qclprogram.html#log">log</a>() and <a href="qclprogram.html#createKernel">createKernel</a>().</p>
<!-- @@@build -->
<!-- $$$context[overload1]$$$context -->
<h3 class="fn"><a name="context"></a><a href="qclcontext.html">QCLContext</a> * QCLProgram::context () const</h3>
<p>Returns the OpenCL context that this program was created within.</p>
<!-- @@@context -->
<!-- $$$createKernel[overload1]$$$createKernelconstchar* -->
<h3 class="fn"><a name="createKernel"></a><a href="qclkernel.html">QCLKernel</a> QCLProgram::createKernel ( const char * <i>name</i> ) const</h3>
<p>Creates a kernel for the entry point associated with <i>name</i> in this program.</p>
<p>See also <a href="qclprogram.html#build">build</a>().</p>
<!-- @@@createKernel -->
<!-- $$$createKernel$$$createKernelconstQByteArray& -->
<h3 class="fn"><a name="createKernel-2"></a><a href="qclkernel.html">QCLKernel</a> QCLProgram::createKernel ( const QByteArray &amp; <i>name</i> ) const</h3>
<p>This is an overloaded function.</p>
<!-- @@@createKernel -->
<!-- $$$createKernel$$$createKernelconstQString& -->
<h3 class="fn"><a name="createKernel-3"></a><a href="qclkernel.html">QCLKernel</a> QCLProgram::createKernel ( const QString &amp; <i>name</i> ) const</h3>
<p>This is an overloaded function.</p>
<!-- @@@createKernel -->
<!-- $$$createKernels[overload1]$$$createKernels -->
<h3 class="fn"><a name="createKernels"></a>QList&lt;<a href="qclkernel.html">QCLKernel</a>&gt; QCLProgram::createKernels () const</h3>
<p>Creates a list of kernels for all of the entry points in this program.</p>
<!-- @@@createKernels -->
<!-- $$$devices[overload1]$$$devices -->
<h3 class="fn"><a name="devices"></a>QList&lt;<a href="qcldevice.html">QCLDevice</a>&gt; QCLProgram::devices () const</h3>
<p>Returns the list of devices that this program is associated with.</p>
<p>See also <a href="qclprogram.html#binaries">binaries</a>().</p>
<!-- @@@devices -->
<!-- $$$isNull[overload1]$$$isNull -->
<h3 class="fn"><a name="isNull"></a>bool QCLProgram::isNull () const</h3>
<p>Returns null if this OpenCL program object is null.</p>
<!-- @@@isNull -->
<!-- $$$log[overload1]$$$log -->
<h3 class="fn"><a name="log"></a>QString QCLProgram::log () const</h3>
<p>Returns the error log that resulted from the last <a href="qclprogram.html#build">build</a>().</p>
<p>See also <a href="qclprogram.html#build">build</a>().</p>
<!-- @@@log -->
<!-- $$$programId[overload1]$$$programId -->
<h3 class="fn"><a name="programId"></a>cl_program QCLProgram::programId () const</h3>
<p>Returns the native OpenCL identifier for this program.</p>
<!-- @@@programId -->
<!-- $$$sourceCode[overload1]$$$sourceCode -->
<h3 class="fn"><a name="sourceCode"></a>QByteArray QCLProgram::sourceCode () const</h3>
<p>Returns the source code that was specified when this program was created.</p>
<p>See also <a href="qclcontext.html#createProgramFromSourceCode">QCLContext::createProgramFromSourceCode</a>() and <a href="qclprogram.html#binaries">binaries</a>().</p>
<!-- @@@sourceCode -->
<!-- $$$unloadCompiler[overload1]$$$unloadCompiler -->
<h3 class="fn"><a name="unloadCompiler"></a>void QCLProgram::unloadCompiler ()<tt> [static]</tt></h3>
<p>Releases the resources associated with the OpenCL compiler.</p>
<!-- @@@unloadCompiler -->
<!-- $$$operator!=[overload1]$$$operator!=constQCLProgram& -->
<h3 class="fn"><a name="operator-not-eq"></a>bool QCLProgram::operator!= ( const QCLProgram &amp; <i>other</i> ) const</h3>
<p>Returns true if this OpenCL program is not the same as <i>other</i>; false otherwise.</p>
<p>See also <a href="qclprogram.html#operator-eq-eq">operator==</a>().</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=constQCLProgram& -->
<h3 class="fn"><a name="operator-eq"></a>QCLProgram &amp; QCLProgram::operator= ( const QCLProgram &amp; <i>other</i> )</h3>
<p>Assigns <i>other</i> to this object.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQCLProgram& -->
<h3 class="fn"><a name="operator-eq-eq"></a>bool QCLProgram::operator== ( const QCLProgram &amp; <i>other</i> ) const</h3>
<p>Returns true if this OpenCL program is the same as <i>other</i>; false otherwise.</p>
<p>See also <a href="qclprogram.html#operator-not-eq">operator!=</a>().</p>
<!-- @@@operator== -->
</div>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td align="left">Copyright &copy; 2010 Nokia Corporation</td>
<td align="right">QtOpenCL Documentation</td>
</tr></table></div></address>  <script src="scripts/functions.js" type="text/javascript"></script>
  <script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-4457116-5']);
  _gaq.push(['_trackPageview']);
  (function() {
  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
  </script>
</body>
</html>
